<template>
  <div>
    <el-row :gutter="15">
      <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
        <el-col :span="12">
          <el-row type="flex" justify="start" align="top" gutter="15">
            <el-col :span="24">
              <el-form-item label="国家名称" prop="field101">
                <el-input v-model="formData.field101" placeholder="请输入国家名称" clearable
                  :style="{width: '100%'}"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="12">
          <el-row gutter="15">
            <el-col :span="24">
              <el-form-item label="人口数量" prop="field108">
                <el-input v-model="formData.field108" placeholder="请输入人口数量" clearable
                  :style="{width: '100%'}"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="7">
          <el-form-item label="提交" prop="field114">
            <el-button type="primary" icon="el-icon-search" size="medium"> 主要按钮 </el-button>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item size="large">
            <el-button type="primary" @click="submitForm">提交</el-button>
            <el-button @click="resetForm">重置</el-button>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
  </div>
</template>
<script>
export default {
  components: {},
  props: [],
  data() {
    return {
      formData: {
        field101: undefined,
        field108: undefined,
        field114: '',
      },
      rules: {
        field101: [{
          required: true,
          message: '请输入国家名称',
          trigger: 'blur'
        }],
        field108: [{
          required: true,
          message: '请输入人口数量',
          trigger: 'blur'
        }],
      },
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    submitForm() {
      this.$refs['elForm'].validate(valid => {
        if (!valid) return
        // TODO 提交表单
		console.log('111');
      })
    },
    resetForm() {
      this.$refs['elForm'].resetFields()
    },
  }
}

</script>
<style>
</style>
